<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="元数据管理,atlas,血缘,">










<meta name="description" content="背景：笔者和团队的小伙伴近期在进行数据治理/元数据管理方向的探索, 在接下来的系列文章中, 会陆续与读者们进行分享在此过程中踩过的坑和收获。  0. 当我们谈论数据治理/元数据管理的时候，我们究竟在讨论什么？谈到数据治理，自然离不开元数据。元数据(Metadata)，用一句话定义就是：描述数据的数据。元数据打通了数据源、数据仓库、数据应用，记录了数据从产生到消费的全过程。因此，数据治理的核心就是">
<meta name="keywords" content="元数据管理,atlas,血缘">
<meta property="og:type" content="article">
<meta property="og:title" content="使用Atlas进行元数据管理之Glossary(术语)">
<meta property="og:url" content="http://mantoudev.com/使用Atlas进行元数据管理之Glossary(术语)/index.html">
<meta property="og:site_name" content="MantouDev">
<meta property="og:description" content="背景：笔者和团队的小伙伴近期在进行数据治理/元数据管理方向的探索, 在接下来的系列文章中, 会陆续与读者们进行分享在此过程中踩过的坑和收获。  0. 当我们谈论数据治理/元数据管理的时候，我们究竟在讨论什么？谈到数据治理，自然离不开元数据。元数据(Metadata)，用一句话定义就是：描述数据的数据。元数据打通了数据源、数据仓库、数据应用，记录了数据从产生到消费的全过程。因此，数据治理的核心就是">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="https://atlas.apache.org/images/twiki/architecture.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/terms_view.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/category_view_1.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/term_view_context.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/term_delete_context.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/term_details.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/term_add_classification_1.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/term_add_classification_2.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/term_with_classification.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/terms_related_terms.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/term_add_category.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/category_view_2.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/category_view_glossary_context.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/category_view_category_context_1.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/category_details_with_terms.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/category_add_term.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/category_add_term_1.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/category_add_term_2.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/entity_search_add_term.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/entity_details_add_term.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/entity_add_term_modal.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/term_details_with_classification.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/entity_assigned_term_with_tag.png">
<meta property="og:image" content="https://atlas.apache.org/images/markdown/term_search.png">
<meta property="og:image" content="https://s1.ax1x.com/2018/11/15/ivYkdI.png">
<meta property="og:image" content="https://s1.ax1x.com/2018/11/15/ivYVFP.png">
<meta property="og:updated_time" content="2018-11-28T06:28:02.724Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="使用Atlas进行元数据管理之Glossary(术语)">
<meta name="twitter:description" content="背景：笔者和团队的小伙伴近期在进行数据治理/元数据管理方向的探索, 在接下来的系列文章中, 会陆续与读者们进行分享在此过程中踩过的坑和收获。  0. 当我们谈论数据治理/元数据管理的时候，我们究竟在讨论什么？谈到数据治理，自然离不开元数据。元数据(Metadata)，用一句话定义就是：描述数据的数据。元数据打通了数据源、数据仓库、数据应用，记录了数据从产生到消费的全过程。因此，数据治理的核心就是">
<meta name="twitter:image" content="https://atlas.apache.org/images/twiki/architecture.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Gemini',
    version: '5.1.4',
    sidebar: {"position":"right","display":"post","offset":12,"b2t":false,"scrollpercent":true,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://mantoudev.com/使用Atlas进行元数据管理之Glossary(术语)/">





  <title>使用Atlas进行元数据管理之Glossary(术语) | MantouDev</title>
  




<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  ga('create', 'UA-129870378-1', 'auto');
  ga('send', 'pageview');
</script>





</head>

<body itemscope="" itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-right page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope="" itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">MantouDev</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">🐈 👀</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br>
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br>
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br>
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br>
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>
            
            归档
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br>
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <div class="popup search-popup local-search-popup">
  <div class="local-search-header clearfix">
    <span class="search-icon">
      <i class="fa fa-search"></i>
    </span>
    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
    <div class="local-search-input-wrapper">
      <input autocomplete="off" placeholder="搜索..." spellcheck="false" type="text" id="local-search-input">
    </div>
  </div>
  <div id="local-search-result"></div>
</div>



    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://mantoudev.com/使用Atlas进行元数据管理之Glossary(术语)/">

    <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Mantou">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="MantouDev">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">使用Atlas进行元数据管理之Glossary(术语)</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2018-11-27T09:39:40+08:00">
                2018-11-27
              </time>
            

            

            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope="" itemtype="http://schema.org/Thing">
                  <a href="/categories/BigData/" itemprop="url" rel="index">
                    <span itemprop="name">BigData</span>
                  </a>
                </span>

                
                
                  ， 
                
              
                <span itemprop="about" itemscope="" itemtype="http://schema.org/Thing">
                  <a href="/categories/BigData/元数据管理/" itemprop="url" rel="index">
                    <span itemprop="name">元数据管理</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          
             <span id="/使用Atlas进行元数据管理之Glossary(术语)/" class="leancloud_visitors" data-flag-title="使用Atlas进行元数据管理之Glossary(术语)">
               <span class="post-meta-divider">|</span>
               <span class="post-meta-item-icon">
                 <i class="fa fa-eye"></i>
               </span>
               
                 <span class="post-meta-item-text">阅读次数&#58;</span>
               
                 <span class="leancloud-visitors-count"></span>
             </span>
          

          

          
            <div class="post-wordcount">
              
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">字数统计&#58;</span>
                
                <span title="字数统计">
                  3.6k
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                <span title="阅读时长">
                  14
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <blockquote>
<p>背景：笔者和团队的小伙伴近期在进行<strong>数据治理/元数据管理</strong>方向的探索, 在接下来的系列文章中, 会陆续与读者们进行分享在此过程中踩过的坑和收获。</p>
</blockquote>
<h2 id="0-当我们谈论数据治理-元数据管理的时候，我们究竟在讨论什么？"><a href="#0-当我们谈论数据治理-元数据管理的时候，我们究竟在讨论什么？" class="headerlink" title="0. 当我们谈论数据治理/元数据管理的时候，我们究竟在讨论什么？"></a>0. 当我们谈论数据治理/元数据管理的时候，我们究竟在讨论什么？</h2><p>谈到数据治理，自然离不开元数据。元数据(Metadata)，用一句话定义就是：描述数据的数据。元数据打通了数据源、数据仓库、数据应用，记录了数据从产生到消费的全过程。因此，数据治理的核心就是<code>元数据管理</code>。<br><a id="more"></a></p>
<p>数据的真正价值在于数据驱动决策，通过数据指导运营。通过数据驱动的方法判断趋势，帮住我们发现问题，继而推动创新或产生新的解决方案。随着企业数据爆发式增长，数据体量越来越难以估量，我们很难说清楚我们到底拥有哪些数据，这些数据从哪里来，到哪里去，发生了什么变化，应该如何使用它们。因此元数据管理(数据治理)成为企业级数据湖不可或缺的重要组成部分。</p>
<p>可惜很长一段时间内，市面都没有成熟的数据治理解决方案。直到2015年，Hortonworks终于坐不住了，约了一众小伙伴公司倡议：咱们开始整个数据治理方案吧。然后，包含数据分类、集中策略引擎、数据血缘、安全和生命周期管理功能的Atlas应运而生。(PS：另一个应用的较多的元数据开源项目是Linkedin 在2016年新开源的项目：<code>WhereHows</code>)Atlas目前最新的版本为2018年9月18日发布的<code>1.0.0</code>版本。</p>
<h2 id="1-Atlas介绍"><a href="#1-Atlas介绍" class="headerlink" title="1. Atlas介绍"></a>1. Atlas介绍</h2><p>Atlas 是一个可伸缩和可扩展的核心基础治理服务集合 ，使企业能够有效地和高效地满足 Hadoop 中的合规性要求，并允许与整个企业数据生态系统的集成。</p>
<p>Apache Atlas为组织提供开放式元数据管理和治理功能，用以构建其数据资产目录，对这些资产进行分类和管理，并为数据科学家，数据分析师和数据治理团队提供围绕这些数据资产的协作功能。</p>
<p><img src="https://atlas.apache.org/images/twiki/architecture.png" alt="Atlas High Level Architecture"></p>
<p>关于Atlas的背景讲完了，接下来我们依次来讲Atlas中的几个概念，首先是今天的主角：<code>Glossary</code>。</p>
<h3 id="1-1-Glossary-术语表-介绍"><a href="#1-1-Glossary-术语表-介绍" class="headerlink" title="1.1 Glossary(术语表) 介绍"></a>1.1 Glossary(术语表) 介绍</h3><p>Atlas的术语表(Glossary)提供了一些适当的“单词”，这些“单词”能彼此进行关连和分类，以便业务用户在使用的时候，即使在不同的上下文中也能很好的理解它们。此外，这些术语也是可以映射到数据资产中的，比如：数据库，表，列等。</p>
<p>术语表抽象出了和数据相关的专业术语，使得用户能以他们更熟悉的方式去查找和使用数据。</p>
<h3 id="1-2-术语表功能"><a href="#1-2-术语表功能" class="headerlink" title="1.2 术语表功能"></a>1.2 术语表功能</h3><ul>
<li>能够使用自然语言（技术术语和/或业务术语）定义丰富的术语词汇表。</li>
<li>能够将术语在语义上相互关联。</li>
<li>能够将资产映射到术语表中。</li>
<li>能够按类别划分这些术语。这为术语增加了更多的上下文。</li>
<li>允许按层次结构排列类别，能展示更广泛和更精细的范围。</li>
<li>从元数据中独立管理术语表。</li>
</ul>
<h3 id="1-3-术语-Term"><a href="#1-3-术语-Term" class="headerlink" title="1.3 术语(Term)"></a>1.3 术语(Term)</h3><p>对于企业来说术语作用的非常大的。对于有用且有意义的术语，需要围绕其用途和上下文进行分组。 Apache Atlas中的术语必须具有唯一的qualifiedName，可以有相同名称的术语，但它们不能属于同一个术语表。具有相同名称的术语只能存在于不同的术语表中。</p>
<p>术语名称可以包含空格，下划线和短划线（作为引用单词的自然方式）但不包含“。”或“@”，因为qualifiedName的格式为：<code>&lt;术语&gt;@&lt;术语限定名&gt;</code>。限定名称可以更轻松地使用特定术语。</p>
<p>术语只能属于单个术语表，并且它们的生命周期也是相同的，如果删除术语表，则术语也会被删除。术语可以属于零个或多个类别，这允许将它们限定为更小或更大的上下文。</p>
<p>可以在Apache Atlas中为一个或多个实体分配/链接一个术语。可以使用分类（<code>classifications</code>，类似标签的作用）对术语进行分类，并将相同的分类应用于分配术语的实体。</p>
<h3 id="1-4-类别-Category"><a href="#1-4-类别-Category" class="headerlink" title="1.4 类别(Category)"></a>1.4 类别(Category)</h3><p>类别是组织术语的一种方式，以便可以丰富术语的上下文。</p>
<p>类别可能包含也可能不包含层次结构，即子类别层次结构。类别的qualifiedName是使用它在术语表中的分层位置导出的，例如:<code>&lt;类别名称&gt;.&lt;父类别限定名&gt;</code>。当发生任何层级更改时，此限定名称都会更新，例如：添加父类别，删除父类别或更改父类别。</p>
<h2 id="2-Atlas-Web-UI"><a href="#2-Atlas-Web-UI" class="headerlink" title="2. Atlas Web UI"></a>2. Atlas Web UI</h2><p>Apache Atlas UI提供了友好的用户界面，可以使用术语表相关的功能，其中包括：</p>
<ul>
<li>创建术语表，术语和类别</li>
<li>在术语之间创建各种关系: synonymns(同义词)，antonymns(反义词)，seeAlso(参考)</li>
<li>调整类别的层次结构中</li>
<li>为实体分配实体(entities)</li>
<li>使用关联术语搜索实体</li>
</ul>
<p>与术语表相关的UI都可以在<code>GLOSSARY</code>的Tab下找到。</p>
<h3 id="2-1-Glossary-Tab"><a href="#2-1-Glossary-Tab" class="headerlink" title="2.1 Glossary Tab"></a>2.1 Glossary Tab</h3><p>Apache Atlas UI提供了两种使用术语表的方法: <code>术语(Terms)视图</code>和<code>类别(Category)视图</code>。</p>
<h4 id="1-术语视图-Terms"><a href="#1-术语视图-Terms" class="headerlink" title="(1) 术语视图(Terms)"></a>(1) 术语视图(Terms)</h4><p>术语视图允许用户执行以下操作：</p>
<ul>
<li>创建，更新和删除术语</li>
<li>添加，删除和更新与术语关联的分类</li>
<li>添加，删除和更新术语的分类</li>
<li>在术语之间创建各种关系</li>
<li>查看与术语关联的实体</li>
</ul>
<h4 id="2-类别视图-Category"><a href="#2-类别视图-Category" class="headerlink" title="(2) 类别视图(Category)"></a>(2) 类别视图(Category)</h4><p>类别视图允许用户执行以下操作：</p>
<ul>
<li>创建，更新和删除类别和子类别</li>
<li>将术语与类别相关联</li>
</ul>
<p>用户可以使用术语表选项卡中提供的切换在术语视图和类别视图之间切换。<br><img src="https://atlas.apache.org/images/markdown/terms_view.png" alt="术语视图"></p>
<p><img src="https://atlas.apache.org/images/markdown/category_view_1.png" alt="分类视图"></p>
<h3 id="2-2-术语视图-Terms"><a href="#2-2-术语视图-Terms" class="headerlink" title="2.2 术语视图(Terms)"></a>2.2 术语视图(Terms)</h3><ul>
<li>创建一个新术语<br>单击术语表名称旁边的省略号（…）会显示一个弹出式菜单，允许用户在术语表中创建术语或删除术语表 - 如下所示。<br><img src="https://atlas.apache.org/images/markdown/term_view_context.png" alt="创建术语"></li>
</ul>
<ul>
<li>删除一个术语<br>单击术语名称旁边的省略号（…）会显示一个弹出式菜单，允许用户删除该术语 - 如下所示。<br><img src="https://atlas.apache.org/images/markdown/term_delete_context.png" alt="删除术语"></li>
</ul>
<h4 id="2-2-1-术语详情"><a href="#2-2-1-术语详情" class="headerlink" title="2.2.1 术语详情"></a>2.2.1 术语详情</h4><p>选择术语表UI中的术语，可以查看对应术语的各种详细信息。详细信息页面下的每个选项卡提供该术语的不同详细信息。</p>
<ul>
<li><code>Entities(实体)</code>选项卡：显示分配给所选术语的实体</li>
<li><code>Classifications(分类)</code>选项卡：显示与所选术语关联的分类</li>
<li><code>Related terms (相关术语)</code>选项卡：显示与所选术语相关的术语<br><img src="https://atlas.apache.org/images/markdown/term_details.png" alt="术语详情"></li>
</ul>
<h4 id="2-2-2-给术语添加分类-classification"><a href="#2-2-2-给术语添加分类-classification" class="headerlink" title="2.2.2 给术语添加分类(classification)"></a>2.2.2 给术语添加分类(classification)</h4><p>单击分类标签旁边的<code>+</code>可为术语添加分类。<br><img src="https://atlas.apache.org/images/markdown/term_add_classification_1.png" alt="添加分类1"></p>
<p><img src="https://atlas.apache.org/images/markdown/term_add_classification_2.png" alt="添加分类2"></p>
<p><img src="https://atlas.apache.org/images/markdown/term_with_classification.png" alt="添加分类3"></p>
<h4 id="2-2-3-与其他术语建立术语关联"><a href="#2-2-3-与其他术语建立术语关联" class="headerlink" title="2.2.3 与其他术语建立术语关联"></a>2.2.3 与其他术语建立术语关联</h4><p>查看术语详细信息时，单击<code>Related Terms(相关术语)</code>选项卡。单击<code>+</code>将术语与当前术语链接。<br><img src="https://atlas.apache.org/images/markdown/terms_related_terms.png" alt="关联"></p>
<h4 id="2-2-4-对术语进行分类"><a href="#2-2-4-对术语进行分类" class="headerlink" title="2.2.4 对术语进行分类"></a>2.2.4 对术语进行分类</h4><p>单击类别标签旁边的<code>+</code>可对术语进行分类。将提供模态对话框以选择类别。<br><img src="https://atlas.apache.org/images/markdown/term_add_category.png" alt="分类"></p>
<h3 id="2-3-类别视图-Category"><a href="#2-3-类别视图-Category" class="headerlink" title="2.3 类别视图(Category)"></a>2.3 类别视图(Category)</h3><p>当切换开关处于<code>Category</code>时，左侧面板将列出所有术语表以及类别层次结构。</p>
<p><img src="https://atlas.apache.org/images/markdown/category_view_2.png" alt="image"></p>
<h4 id="2-3-1-类别菜单-Category"><a href="#2-3-1-类别菜单-Category" class="headerlink" title="2.3.1 类别菜单(Category)"></a>2.3.1 类别菜单(Category)</h4><p>单击<code>Category</code>旁边的省略号<code>...</code>将显示类别上下文菜单。</p>
<ul>
<li><p>创建新类别<br><img src="https://atlas.apache.org/images/markdown/category_view_glossary_context.png" alt="创建类别"></p>
</li>
<li><p>创建子类别或删除类别<br><img src="https://atlas.apache.org/images/markdown/category_view_category_context_1.png" alt="创建/删除子类别"></p>
</li>
</ul>
<h4 id="2-3-2-类别详情"><a href="#2-3-2-类别详情" class="headerlink" title="2.3.2 类别详情"></a>2.3.2 类别详情</h4><p>选择<code>Category</code>后，详细信息将显示在右侧窗口中。</p>
<p><img src="https://atlas.apache.org/images/markdown/category_details_with_terms.png" alt="分类详情"></p>
<h4 id="2-3-3-术语分类"><a href="#2-3-3-术语分类" class="headerlink" title="2.3.3 术语分类"></a>2.3.3 术语分类</h4><p>单击详情页中<code>Terms</code>标签旁边的<code>+</code>链接所选类别下的术语。</p>
<p><img src="https://atlas.apache.org/images/markdown/category_add_term.png" alt="术语分类1"></p>
<p><img src="https://atlas.apache.org/images/markdown/category_add_term_1.png" alt="术语分类2"></p>
<p><img src="https://atlas.apache.org/images/markdown/category_add_term_2.png" alt="术语分类3"></p>
<h2 id="3-术语分配流程"><a href="#3-术语分配流程" class="headerlink" title="3. 术语分配流程"></a>3. 术语分配流程</h2><p>可以在搜索结果页和<code>Glossary-Terms</code>实体详情页中给<code>entity(实体)</code>分配术语。</p>
<h3 id="3-1-分配术语"><a href="#3-1-分配术语" class="headerlink" title="3.1 分配术语"></a>3.1 分配术语</h3><p>在搜索结果页面，点击<code>terms</code>列下的<code>+</code></p>
<p><img src="https://atlas.apache.org/images/markdown/entity_search_add_term.png" alt="分配术语1"></p>
<p>点击<code>terms</code>标签旁边的<code>+</code><br><img src="https://atlas.apache.org/images/markdown/entity_details_add_term.png" alt="分配术语2"></p>
<p>这两个操作都将显示下面的结果，按照屏幕上的提示完成术语分配。<br><img src="https://atlas.apache.org/images/markdown/entity_add_term_modal.png" alt="完成术语分配"></p>
<h3 id="3-2-分类传播-Propagated-classification"><a href="#3-2-分类传播-Propagated-classification" class="headerlink" title="3.2 分类传播(Propagated classification)"></a>3.2 分类传播(Propagated classification)</h3><p>如果一个术语具有分类，则该术语下的实体继承相同的分类。</p>
<p><img src="https://atlas.apache.org/images/markdown/term_details_with_classification.png" alt="image"></p>
<p><img src="https://atlas.apache.org/images/markdown/entity_assigned_term_with_tag.png" alt="image"></p>
<h3 id="3-3-使用术语搜索"><a href="#3-3-使用术语搜索" class="headerlink" title="3.3. 使用术语搜索"></a>3.3. 使用术语搜索</h3><p>Apache Atlas基本搜索API和UI已更新，以支持术语作为搜索条件。允许用户查找与给定术语相关联的实体。</p>
<p><img src="https://atlas.apache.org/images/markdown/term_search.png" alt="搜索"></p>
<h2 id="4-REST-API"><a href="#4-REST-API" class="headerlink" title="4. REST API"></a>4. REST API</h2><p>Atlas支持以下操作，可在<a href="https://atlas.apache.org/1.1.0/api/v2/index.html" target="_blank" rel="noopener">这里</a>找到REST接口的详细信息。</p>
<p><img src="https://s1.ax1x.com/2018/11/15/ivYkdI.png" alt="Glossary REST API"><br><img src="https://s1.ax1x.com/2018/11/15/ivYVFP.png" alt="Glossary REST API"></p>
<h2 id="5-JSON结构"><a href="#5-JSON结构" class="headerlink" title="5. JSON结构"></a>5. JSON结构</h2><ul>
<li>Glossary</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">    &quot;guid&quot;: &quot;2f341934-f18c-48b3-aa12-eaa0a2bfce85&quot;,</span><br><span class="line">    &quot;qualifiedName&quot;: &quot;SampleBank&quot;,</span><br><span class="line">    &quot;displayName&quot;: &quot;Banking&quot;,</span><br><span class="line">    &quot;shortDescription&quot;: &quot;Glossary of bank&quot;,</span><br><span class="line">    &quot;longDescription&quot;: &quot;Glossary of bank - long description&quot;,</span><br><span class="line">    &quot;language&quot;: &quot;English&quot;,</span><br><span class="line">    &quot;usage&quot;: &quot;N/A&quot;,</span><br><span class="line">    &quot;terms&quot;: [</span><br><span class="line">    &#123;</span><br><span class="line">        &quot;termGuid&quot;: &quot;502d34f1-b85f-4ad9-9d9f-fe7020ff0acb&quot;,</span><br><span class="line">        &quot;relationGuid&quot;: &quot;6bb803e4-3af6-4924-aad6-6ad9f95ecd14&quot;,</span><br><span class="line">        &quot;displayText&quot;: &quot;A savings account&quot;</span><br><span class="line">    &#125;, &#123;</span><br><span class="line">        &quot;termGuid&quot;: &quot;e441a540-ee55-4fc8-8eaf-4b9943d8929c&quot;,</span><br><span class="line">        &quot;relationGuid&quot;: &quot;dbc46795-76ff-4f68-9043-be0eff0bc0f3&quot;,</span><br><span class="line">        &quot;displayText&quot;: &quot;15-30 yr mortgage&quot;</span><br><span class="line">    &#125;, &#123;</span><br><span class="line">        &quot;termGuid&quot;: &quot;998e3692-51a8-47fe-b3a0-0d9f794437eb&quot;,</span><br><span class="line">        &quot;relationGuid&quot;: &quot;0dcd31b9-a81c-4185-ad4b-9209a97c305b&quot;,</span><br><span class="line">        &quot;displayText&quot;: &quot;A checking account&quot;</span><br><span class="line">    &#125;, &#123;</span><br><span class="line">        &quot;termGuid&quot;: &quot;c4e2b956-2589-4648-8596-240d3bea5e44&quot;,</span><br><span class="line">        &quot;relationGuid&quot;: &quot;e71c4a5d-694b-47a5-a41e-126ade857279&quot;,</span><br><span class="line">        &quot;displayText&quot;: &quot;ARM loans&quot;</span><br><span class="line">    &#125;],</span><br><span class="line">    &quot;categories&quot;: [&#123;</span><br><span class="line">        &quot;categoryGuid&quot;: &quot;dd94859e-7453-4bc9-b634-a17fc14590f8&quot;,</span><br><span class="line">        &quot;parentCategoryGuid&quot;: &quot;e6a3df1f-5670-4f9e-84da-91f77d008ce3&quot;,</span><br><span class="line">        &quot;relationGuid&quot;: &quot;a0b7da02-1ccd-4415-bc54-3d0cdb8857e7&quot;,</span><br><span class="line">        &quot;displayText&quot;: &quot;Accounts&quot;</span><br><span class="line">    &#125;, &#123;</span><br><span class="line">        &quot;categoryGuid&quot;: &quot;e6a3df1f-5670-4f9e-84da-91f77d008ce3&quot;,</span><br><span class="line">        &quot;relationGuid&quot;: &quot;0e84a358-a4aa-4bd3-b806-497a6962ae1d&quot;,</span><br><span class="line">        &quot;displayText&quot;: &quot;Customer&quot;</span><br><span class="line">    &#125;, &#123;</span><br><span class="line">        &quot;categoryGuid&quot;: &quot;7f041401-de8c-443f-a3b7-7bf5a910ff6f&quot;,</span><br><span class="line">        &quot;parentCategoryGuid&quot;: &quot;e6a3df1f-5670-4f9e-84da-91f77d008ce3&quot;,</span><br><span class="line">        &quot;relationGuid&quot;: &quot;7757b031-4e25-43a8-bf77-946f7f06c67a&quot;,</span><br><span class="line">        &quot;displayText&quot;: &quot;Loans&quot;</span><br><span class="line">    &#125;]</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<ul>
<li>Term</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">    &quot;guid&quot;: &quot;e441a540-ee55-4fc8-8eaf-4b9943d8929c&quot;,</span><br><span class="line">    &quot;qualifiedName&quot;: &quot;fixed_mtg@SampleBank&quot;,</span><br><span class="line">    &quot;displayName&quot;: &quot;15-30 yr mortgage&quot;,</span><br><span class="line">    &quot;shortDescription&quot;: &quot;Short description&quot;,</span><br><span class="line">    &quot;longDescription&quot;: &quot;Long description&quot;,</span><br><span class="line">    &quot;examples&quot;: [&quot;N/A&quot;],</span><br><span class="line">    &quot;abbreviation&quot;: &quot;FMTG&quot;,</span><br><span class="line">    &quot;anchor&quot;: &#123;</span><br><span class="line">        &quot;glossaryGuid&quot;: &quot;2f341934-f18c-48b3-aa12-eaa0a2bfce85&quot;,</span><br><span class="line">        &quot;relationGuid&quot;: &quot;dbc46795-76ff-4f68-9043-be0eff0bc0f3&quot;</span><br><span class="line">    &#125;,</span><br><span class="line">    &quot;categories&quot;: [&#123;</span><br><span class="line">        &quot;categoryGuid&quot;: &quot;7f041401-de8c-443f-a3b7-7bf5a910ff6f&quot;,</span><br><span class="line">        &quot;relationGuid&quot;: &quot;b4cddd33-7b0c-41e2-9324-afe549ec6ada&quot;,</span><br><span class="line">        &quot;displayText&quot;: &quot;Loans&quot;</span><br><span class="line">    &#125;],</span><br><span class="line">    &quot;seeAlso&quot;           : [],</span><br><span class="line">    &quot;synonyms&quot;          : [],</span><br><span class="line">    &quot;antonyms&quot;          : [],</span><br><span class="line">    &quot;replacedBy&quot;        : [],</span><br><span class="line">    &quot;replacementTerms&quot;  : [],</span><br><span class="line">    &quot;translationTerms&quot;  : [],</span><br><span class="line">    &quot;translatedTerms&quot;   : [],</span><br><span class="line">    &quot;isA&quot;               : [],</span><br><span class="line">    &quot;classifies&quot;        : [],</span><br><span class="line">    &quot;preferredTerms&quot;    : [],</span><br><span class="line">    &quot;preferredToTerms&quot;: [ &#123;</span><br><span class="line">                           &quot;termGuid&quot;   : &quot;c4e2b956-2589-4648-8596-240d3bea5e44&quot;,</span><br><span class="line">                           &quot;displayText&quot;: &quot;ARM Loans&quot;</span><br><span class="line">                         &#125;]</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<ul>
<li>Category</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">    &quot;guid&quot;: &quot;7f041401-de8c-443f-a3b7-7bf5a910ff6f&quot;,</span><br><span class="line">    &quot;qualifiedName&quot;: &quot;Loans.Customer@HortoniaBank&quot;,</span><br><span class="line">    &quot;displayName&quot;: &quot;Loans&quot;,</span><br><span class="line">    &quot;shortDescription&quot;: &quot;Loan categorization&quot;,</span><br><span class="line">    &quot;anchor&quot;: &#123;</span><br><span class="line">        &quot;glossaryGuid&quot;: &quot;2f341934-f18c-48b3-aa12-eaa0a2bfce85&quot;,</span><br><span class="line">        &quot;relationGuid&quot;: &quot;7757b031-4e25-43a8-bf77-946f7f06c67a&quot;</span><br><span class="line">    &#125;,</span><br><span class="line">    &quot;parentCategory&quot;: &#123;</span><br><span class="line">        &quot;categoryGuid&quot;: &quot;e6a3df1f-5670-4f9e-84da-91f77d008ce3&quot;,</span><br><span class="line">        &quot;relationGuid&quot;: &quot;8a0a8e11-0bb5-483b-b7d6-cfe0b1d55ef6&quot;</span><br><span class="line">    &#125;,</span><br><span class="line">    &quot;childrenCategories&quot; : [],</span><br><span class="line">    &quot;terms&quot;: [&#123;</span><br><span class="line">        &quot;termGuid&quot;: &quot;e441a540-ee55-4fc8-8eaf-4b9943d8929c&quot;,</span><br><span class="line">        &quot;relationGuid&quot;: &quot;b4cddd33-7b0c-41e2-9324-afe549ec6ada&quot;,</span><br><span class="line">        &quot;displayText&quot;: &quot;15-30 yr mortgage&quot;</span><br><span class="line">    &#125;, &#123;</span><br><span class="line">        &quot;termGuid&quot;: &quot;c4e2b956-2589-4648-8596-240d3bea5e44&quot;,</span><br><span class="line">        &quot;relationGuid&quot;: &quot;8db1e784-4f04-4eda-9a58-6c9535a95451&quot;,</span><br><span class="line">        &quot;displayText&quot;: &quot;ARM loans&quot;</span><br><span class="line">    &#125;]</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="5-1-CURD"><a href="#5-1-CURD" class="headerlink" title="5.1 CURD"></a>5.1 CURD</h3><h4 id="（1）创建操作-CREATE"><a href="#（1）创建操作-CREATE" class="headerlink" title="（1）创建操作(CREATE)"></a>（1）创建操作(CREATE)</h4><ol>
<li>创建术语表</li>
<li>创建一个术语</li>
<li>创建分类术语</li>
<li>用关系创建术语</li>
<li>创建一个类别</li>
<li>创建具有层次结构的类别</li>
<li>创建类别并对术语进行分类</li>
<li>为实体分配术语</li>
</ol>
<p><strong>注意：</strong></p>
<ul>
<li>在创建操作期间，术语表，术语和类别将获得自动分配的GUID和qualifiedName。</li>
<li>要创建包含子项的类别，必须事先创建子项。</li>
<li>要创建属于某个类别的术语，必须事先创建该类别。</li>
<li>要创建关系术语，必须事先创建相关术语。</li>
</ul>
<h4 id="（2）读操作-READ"><a href="#（2）读操作-READ" class="headerlink" title="（2）读操作(READ)"></a>（2）读操作(READ)</h4><ol>
<li>通过GUID获取术语表 - 提供属于术语表的所有术语和类别（标题）。  </li>
<li>获取所有术语表 - 为所有术语表提供他们的术语和类别（标题）。  </li>
<li>通过GUID获取术语 - 提供有关术语，其所属类别（如果有）以及任何相关术语的详细信息。</li>
<li>通过GUID获取类别 - 提供有关类别，类别层次结构（如果有）和属于该类别的术语的详细信息。</li>
<li>获取给定术语表的所有术语 - 提供属于给定术语表的所有术语（具有＃3中提到的详细信息）。</li>
<li>获取给定术语表的所有类别 - 提供属于给定术语表的所有类别（具有＃4中提到的详细信息）。</li>
<li>获取与给定术语相关的所有术语 - 提供与给定术语相关/链接的所有术语。</li>
<li>获取与给定类别（父母和子女）相关的所有类别</li>
<li>获取给定类别的所有条款</li>
</ol>
<h4 id="（3）更新操作-UPDATE"><a href="#（3）更新操作-UPDATE" class="headerlink" title="（3）更新操作(UPDATE)"></a>（3）更新操作(UPDATE)</h4><ol>
<li>局部更新术语表</li>
<li>局部更新术语</li>
<li>局部更新类别</li>
<li>更新给定的词汇表</li>
<li>更新给定的术语</li>
<li>更新给定的类别</li>
</ol>
<p><strong>注意：</strong></p>
<ul>
<li>局部更新仅处理词汇表模型文件中定义的<strong>原始属性</strong>。</li>
<li>分配后，无法更改GUID和qualifiedName。唯一的方法是删除并重新创建所需的对象。</li>
<li>在任何更新中都无法删除<strong>锚点</strong></li>
<li>更新API期望在GET调用之后就地修改JSON。任何缺失的属性/关系都将被删除。</li>
<li>对类别层次结构的任何更新都会导致对其下的层次结构进行级联更新，例如锚更改会影响所有子项，父项更改会影响self和children的qualifiedName。</li>
</ul>
<h4 id="（4）删除操作-DELETE"><a href="#（4）删除操作-DELETE" class="headerlink" title="（4）删除操作(DELETE)"></a>（4）删除操作(DELETE)</h4><ol>
<li>删除术语表 - 删除锚定到给定词汇表的所有类别和术语。如果已为实体分配任何术语，则会阻止此删除。</li>
<li>删除术语 - 仅当术语未与任何实体关联/分配时才删除该术语。</li>
<li>删除类别 - 仅删除给定类别，所有子项都成为顶级类别。</li>
<li>从实体中删除术语分配</li>
</ol>

      
    </div>
    
    
    

    <div>
      
        
<div class="my_post_copyright">
  <script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js"></script>

  <!-- JS库 sweetalert 可修改路径 -->
  <script type="text/javascript" src="http://jslibs.wuxubj.cn/sweetalert_mini/jquery-1.7.1.min.js"></script>
  <script src="http://jslibs.wuxubj.cn/sweetalert_mini/sweetalert.min.js"></script>
  <link rel="stylesheet" type="text/css" href="http://jslibs.wuxubj.cn/sweetalert_mini/sweetalert.mini.css">
  <p><span>文章作者:</span><a href="/" title="访问 Mantou 的个人博客">Mantou</a></p>
  <p><span>最后更新:</span>2018年11月28日 14:11:02</p>
  <p><span>原始链接:</span><a href="/使用Atlas进行元数据管理之Glossary(术语)/" title="使用Atlas进行元数据管理之Glossary(术语)">http://mantoudev.com/使用Atlas进行元数据管理之Glossary(术语)/</a></p>
  <p><span>版权声明:</span>本博客所有文章除特别声明外，均采用 <i class="fa fa-creative-commons"></i> <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/3.0/" target="_blank" title="Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)"> BY-NC-SA 3.0 许可协议</a>，转载请注明出处！</p>
</div>


      
    </div>

    

    
      <div>
        <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
  <div>谢谢老板~</div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>打赏</span>
  </button>
  <div id="QR" style="display: none;">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="/images/wechatpay.jpg" alt="Mantou 微信支付">
        <p>微信支付</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="/images/alipay.jpg" alt="Mantou 支付宝">
        <p>支付宝</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/元数据管理/" rel="tag"># 元数据管理</a>
          
            <a href="/tags/atlas/" rel="tag"># atlas</a>
          
            <a href="/tags/血缘/" rel="tag"># 血缘</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/[大数据安全]基于Kerberos的大数据安全方案/" rel="next" title="[大数据安全]基于Kerberos的大数据安全方案">
                <i class="fa fa-chevron-left"></i> [大数据安全]基于Kerberos的大数据安全方案
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/使用Atlas进行元数据管理之容错与高可用/" rel="prev" title="使用Atlas进行元数据管理之容错与高可用">
                使用Atlas进行元数据管理之容错与高可用 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
        
  <div class="bdsharebuttonbox">
    <a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
    <a href="#" class="bds_douban" data-cmd="douban" title="分享到豆瓣网"></a>
    <a href="#" class="bds_sqq" data-cmd="sqq" title="分享到QQ好友"></a>
    <a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
    <a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
    <a href="#" class="bds_tieba" data-cmd="tieba" title="分享到百度贴吧"></a>
    <a href="#" class="bds_twi" data-cmd="twi" title="分享到Twitter"></a>
    <a href="#" class="bds_fbook" data-cmd="fbook" title="分享到Facebook"></a>
    <a href="#" class="bds_more" data-cmd="more"></a>
    <a class="bds_count" data-cmd="count"></a>
  </div>
  <script>
    window._bd_share_config = {
      "common": {
        "bdText": "",
        "bdMini": "2",
        "bdMiniList": false,
        "bdPic": ""
      },
      "share": {
        "bdSize": "16",
        "bdStyle": "0"
      },
      "image": {
        "viewList": ["tsina", "douban", "sqq", "qzone", "weixin", "twi", "fbook"],
        "viewText": "分享到：",
        "viewSize": "16"
      }
    }
  </script>

<script>
  with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='//bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
</script>

      
    </div>
  </div>


          </div>
          


          

  
  <div id="gitalk-container"></div>
  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image" src="/images/avatar.jpg" alt="Mantou">
            
              <p class="site-author-name" itemprop="name">Mantou</p>
              <p class="site-description motion-element" itemprop="description">吭哧吭哧👨‍💻‍</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">17</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">7</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">18</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/mantoudev" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="mailto:mantoudev@163.com" target="_blank" title="E-Mail">
                      
                        <i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                  </span>
                
            </div>
          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#0-当我们谈论数据治理-元数据管理的时候，我们究竟在讨论什么？"><span class="nav-text">0. 当我们谈论数据治理/元数据管理的时候，我们究竟在讨论什么？</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#1-Atlas介绍"><span class="nav-text">1. Atlas介绍</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-1-Glossary-术语表-介绍"><span class="nav-text">1.1 Glossary(术语表) 介绍</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-2-术语表功能"><span class="nav-text">1.2 术语表功能</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-3-术语-Term"><span class="nav-text">1.3 术语(Term)</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-4-类别-Category"><span class="nav-text">1.4 类别(Category)</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-Atlas-Web-UI"><span class="nav-text">2. Atlas Web UI</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#2-1-Glossary-Tab"><span class="nav-text">2.1 Glossary Tab</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-术语视图-Terms"><span class="nav-text">(1) 术语视图(Terms)</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-类别视图-Category"><span class="nav-text">(2) 类别视图(Category)</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-2-术语视图-Terms"><span class="nav-text">2.2 术语视图(Terms)</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#2-2-1-术语详情"><span class="nav-text">2.2.1 术语详情</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-2-2-给术语添加分类-classification"><span class="nav-text">2.2.2 给术语添加分类(classification)</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-2-3-与其他术语建立术语关联"><span class="nav-text">2.2.3 与其他术语建立术语关联</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-2-4-对术语进行分类"><span class="nav-text">2.2.4 对术语进行分类</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-3-类别视图-Category"><span class="nav-text">2.3 类别视图(Category)</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#2-3-1-类别菜单-Category"><span class="nav-text">2.3.1 类别菜单(Category)</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-3-2-类别详情"><span class="nav-text">2.3.2 类别详情</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-3-3-术语分类"><span class="nav-text">2.3.3 术语分类</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-术语分配流程"><span class="nav-text">3. 术语分配流程</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#3-1-分配术语"><span class="nav-text">3.1 分配术语</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-2-分类传播-Propagated-classification"><span class="nav-text">3.2 分类传播(Propagated classification)</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-3-使用术语搜索"><span class="nav-text">3.3. 使用术语搜索</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#4-REST-API"><span class="nav-text">4. REST API</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#5-JSON结构"><span class="nav-text">5. JSON结构</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#5-1-CURD"><span class="nav-text">5.1 CURD</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#（1）创建操作-CREATE"><span class="nav-text">（1）创建操作(CREATE)</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#（2）读操作-READ"><span class="nav-text">（2）读操作(READ)</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#（3）更新操作-UPDATE"><span class="nav-text">（3）更新操作(UPDATE)</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#（4）删除操作-DELETE"><span class="nav-text">（4）删除操作(DELETE)</span></a></li></ol></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2018 &mdash; <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Mantou</span>

  
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-area-chart"></i>
    </span>
    
      <span class="post-meta-item-text">Site words total count&#58;</span>
    
    <span title="Site words total count">38.4k</span>
  
</div>


<!--<div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>-->



  <!--<span class="post-meta-divider">|</span>-->



  <!--<div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Gemini</a> v5.1.4</div>-->




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
          <span id="scrollpercent"><span>0</span>%</span>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  <link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css">
  <script src="/js/src/md5.js"></script>
  <script src="https://unpkg.com/gitalk/dist/gitalk.min.js"></script>
   <script type="text/javascript">
		var gitalk = new Gitalk({
		  clientID: '166772c775bb840c4d30',
		  clientSecret: '705cf1b571902b10c6e103604a718ff2ee1dd108',
		  repo: 'blog-comments',
		  owner: 'mantoudev',
		  admin: ['mantoudev'],
		  id: md5(location.pathname),
		  distractionFreeMode: 'true'
		})
		gitalk.render('gitalk-container')
       </script>



  

  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    var path = "/" + search_path;
    // monitor main search box;

    var onPopupClose = function (e) {
      $('.popup').hide();
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.search-popup-overlay').click(onPopupClose);
      $('.popup').toggle();
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }

    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';

      // start loading animation
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay">' +
          '<div id="search-loading-icon">' +
          '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
          '</div>' +
          '</div>')
        .css('overflow', 'hidden');
      $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');

      $.ajax({
        url: path,
        dataType: isXml ? "xml" : "json",
        async: true,
        success: function(res) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = isXml ? $("entry", res).map(function() {
            return {
              title: $("title", this).text(),
              content: $("content",this).text(),
              url: $("url" , this).text()
            };
          }).get() : res;
          var input = document.getElementById(search_id);
          var resultContent = document.getElementById(content_id);
          var inputEventFunction = function() {
            var searchText = input.value.trim().toLowerCase();
            var keywords = searchText.split(/[\s\-]+/);
            if (keywords.length > 1) {
              keywords.push(searchText);
            }
            var resultItems = [];
            if (searchText.length > 0) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var hitCount = 0;
                var searchTextCount = 0;
                var title = data.title.trim();
                var titleInLowerCase = title.toLowerCase();
                var content = data.content.trim().replace(/<[^>]+>/g,"");
                var contentInLowerCase = content.toLowerCase();
                var articleUrl = decodeURIComponent(data.url);
                var indexOfTitle = [];
                var indexOfContent = [];
                // only match articles with not empty titles
                if(title != '') {
                  keywords.forEach(function(keyword) {
                    function getIndexByWord(word, text, caseSensitive) {
                      var wordLen = word.length;
                      if (wordLen === 0) {
                        return [];
                      }
                      var startPosition = 0, position = [], index = [];
                      if (!caseSensitive) {
                        text = text.toLowerCase();
                        word = word.toLowerCase();
                      }
                      while ((position = text.indexOf(word, startPosition)) > -1) {
                        index.push({position: position, word: word});
                        startPosition = position + wordLen;
                      }
                      return index;
                    }

                    indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
                    indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
                  });
                  if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
                    isMatch = true;
                    hitCount = indexOfTitle.length + indexOfContent.length;
                  }
                }

                // show search results

                if (isMatch) {
                  // sort index by position of keyword

                  [indexOfTitle, indexOfContent].forEach(function (index) {
                    index.sort(function (itemLeft, itemRight) {
                      if (itemRight.position !== itemLeft.position) {
                        return itemRight.position - itemLeft.position;
                      } else {
                        return itemLeft.word.length - itemRight.word.length;
                      }
                    });
                  });

                  // merge hits into slices

                  function mergeIntoSlice(text, start, end, index) {
                    var item = index[index.length - 1];
                    var position = item.position;
                    var word = item.word;
                    var hits = [];
                    var searchTextCountInSlice = 0;
                    while (position + word.length <= end && index.length != 0) {
                      if (word === searchText) {
                        searchTextCountInSlice++;
                      }
                      hits.push({position: position, length: word.length});
                      var wordEnd = position + word.length;

                      // move to next position of hit

                      index.pop();
                      while (index.length != 0) {
                        item = index[index.length - 1];
                        position = item.position;
                        word = item.word;
                        if (wordEnd > position) {
                          index.pop();
                        } else {
                          break;
                        }
                      }
                    }
                    searchTextCount += searchTextCountInSlice;
                    return {
                      hits: hits,
                      start: start,
                      end: end,
                      searchTextCount: searchTextCountInSlice
                    };
                  }

                  var slicesOfTitle = [];
                  if (indexOfTitle.length != 0) {
                    slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
                  }

                  var slicesOfContent = [];
                  while (indexOfContent.length != 0) {
                    var item = indexOfContent[indexOfContent.length - 1];
                    var position = item.position;
                    var word = item.word;
                    // cut out 100 characters
                    var start = position - 20;
                    var end = position + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if (end < position + word.length) {
                      end = position + word.length;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
                  }

                  // sort slices in content by search text's count and hits' count

                  slicesOfContent.sort(function (sliceLeft, sliceRight) {
                    if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                      return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                    } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                      return sliceRight.hits.length - sliceLeft.hits.length;
                    } else {
                      return sliceLeft.start - sliceRight.start;
                    }
                  });

                  // select top N slices in content

                  var upperBound = parseInt('1');
                  if (upperBound >= 0) {
                    slicesOfContent = slicesOfContent.slice(0, upperBound);
                  }

                  // highlight title and content

                  function highlightKeyword(text, slice) {
                    var result = '';
                    var prevEnd = slice.start;
                    slice.hits.forEach(function (hit) {
                      result += text.substring(prevEnd, hit.position);
                      var end = hit.position + hit.length;
                      result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                      prevEnd = end;
                    });
                    result += text.substring(prevEnd, slice.end);
                    return result;
                  }

                  var resultItem = '';

                  if (slicesOfTitle.length != 0) {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
                  } else {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
                  }

                  slicesOfContent.forEach(function (slice) {
                    resultItem += "<a href='" + articleUrl + "'>" +
                      "<p class=\"search-result\">" + highlightKeyword(content, slice) +
                      "...</p>" + "</a>";
                  });

                  resultItem += "</li>";
                  resultItems.push({
                    item: resultItem,
                    searchTextCount: searchTextCount,
                    hitCount: hitCount,
                    id: resultItems.length
                  });
                }
              })
            };
            if (keywords.length === 1 && keywords[0] === "") {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>'
            } else if (resultItems.length === 0) {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>'
            } else {
              resultItems.sort(function (resultLeft, resultRight) {
                if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
                  return resultRight.searchTextCount - resultLeft.searchTextCount;
                } else if (resultLeft.hitCount !== resultRight.hitCount) {
                  return resultRight.hitCount - resultLeft.hitCount;
                } else {
                  return resultRight.id - resultLeft.id;
                }
              });
              var searchResultList = '<ul class=\"search-result-list\">';
              resultItems.forEach(function (result) {
                searchResultList += result.item;
              })
              searchResultList += "</ul>";
              resultContent.innerHTML = searchResultList;
            }
          }

          if ('auto' === 'auto') {
            input.addEventListener('input', inputEventFunction);
          } else {
            $('.search-icon').click(inputEventFunction);
            input.addEventListener('keypress', function (event) {
              if (event.keyCode === 13) {
                inputEventFunction();
              }
            });
          }

          // remove loading animation
          $(".local-search-pop-overlay").remove();
          $('body').css('overflow', '');

          proceedsearch();
        }
      });
    }

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function(e){
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 &&
        $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });
  </script>





  

  
  <script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.4.js"></script>
  <script>AV.initialize("1ksH739lNLQGmPbiKV7caYHV-gzGzoHsz", "kgyOnl48BVfVTzUF8NaU6gFY");</script>
  <script>
    function showTime(Counter) {
      var query = new AV.Query(Counter);
      var entries = [];
      var $visitors = $(".leancloud_visitors");

      $visitors.each(function () {
        entries.push( $(this).attr("id").trim() );
      });

      query.containedIn('url', entries);
      query.find()
        .done(function (results) {
          var COUNT_CONTAINER_REF = '.leancloud-visitors-count';

          if (results.length === 0) {
            $visitors.find(COUNT_CONTAINER_REF).text(0);
            return;
          }

          for (var i = 0; i < results.length; i++) {
            var item = results[i];
            var url = item.get('url');
            var time = item.get('time');
            var element = document.getElementById(url);

            $(element).find(COUNT_CONTAINER_REF).text(time);
          }
          for(var i = 0; i < entries.length; i++) {
            var url = entries[i];
            var element = document.getElementById(url);
            var countSpan = $(element).find(COUNT_CONTAINER_REF);
            if( countSpan.text() == '') {
              countSpan.text(0);
            }
          }
        })
        .fail(function (object, error) {
          console.log("Error: " + error.code + " " + error.message);
        });
    }

    function addCount(Counter) {
      var $visitors = $(".leancloud_visitors");
      var url = $visitors.attr('id').trim();
      var title = $visitors.attr('data-flag-title').trim();
      var query = new AV.Query(Counter);

      query.equalTo("url", url);
      query.find({
        success: function(results) {
          if (results.length > 0) {
            var counter = results[0];
            counter.fetchWhenSave(true);
            counter.increment("time");
            counter.save(null, {
              success: function(counter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(counter.get('time'));
              },
              error: function(counter, error) {
                console.log('Failed to save Visitor num, with error message: ' + error.message);
              }
            });
          } else {
            var newcounter = new Counter();
            /* Set ACL */
            var acl = new AV.ACL();
            acl.setPublicReadAccess(true);
            acl.setPublicWriteAccess(true);
            newcounter.setACL(acl);
            /* End Set ACL */
            newcounter.set("title", title);
            newcounter.set("url", url);
            newcounter.set("time", 1);
            newcounter.save(null, {
              success: function(newcounter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(newcounter.get('time'));
              },
              error: function(newcounter, error) {
                console.log('Failed to create');
              }
            });
          }
        },
        error: function(error) {
          console.log('Error:' + error.code + " " + error.message);
        }
      });
    }

    $(function() {
      var Counter = AV.Object.extend("Counter");
      if ($('.leancloud_visitors').length == 1) {
        addCount(Counter);
      } else if ($('.post-title-link').length > 1) {
        showTime(Counter);
      }
    });
  </script>



  

  

  
  

  

  

  

</body>
</html>
